<template>
  <view class="module-goods-list-detail" :style="'background-image: url('+(moduleData.module_background_image||'')+');'">
    <template v-for="(item, index) in moduleData.content_list">
      <goods-item
        :key="index"
        :goods-data="item"
        :show-market-price="moduleData.module_style_type ? false : true"
        :show-sub-name="moduleData.module_style_type ? false : true"
        :goods-status="moduleData.module_style_type ? 3 : -1"></goods-item>
    </template>
  </view>
</template>
<script>
import goodsItem from '@/components/goodsItem/index.vue'
export default {
  name: 'GoodsListDetail',
  components: {
    goodsItem
  },
  props: {
    moduleData: {
      type: Object,
      default() {
        return {
          content_list: []
        }
      }
    }
  },
  data() {
    return {
      screenWidth: 375
    }
  }
}
</script>
<style lang="scss">
.module-goods-list-detail{
  padding: 24rpx 16rpx;
  background-size: cover;

  .c-goods-item,
  goods-item > view{
    padding: 12rpx;
    background: #fff;
    margin-bottom: 24rpx;
    border-radius: 8rpx;
  }
  .c-goods-item,
  goods-item{
    &:last-child{
      margin-bottom: 0;
      &>view{
        margin-bottom: 0;
      }
    }
  }
}
</style>
